type busListType = { [name: string]: Function };
const busList: busListType = {};
export const emit = (key: string, value?: any[]) => {
  const arr = value || [];
  if (busList[key]) {
    return busList[key](...arr);
  }
};
export const on = (key: string, target: Function) => {
  if (busList[key]) return;
  busList[key] = target;
};
